package com.szl.sbssh.controller;

import com.szl.sbssh.pageModel.base.Tree;
import com.szl.sbssh.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Author: songzhonglin
 * Date: 2018/4/25
 * Time: 15:57
 * Description:
 **/
@Controller
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private RoleService roleService;

    @RequestMapping("/tree")
    @ResponseBody
    public List<Tree> tree() {
        return roleService.tree();
    }
}
